[{if $smarty.session.access > 0}]
<table id="jobTable" class="sortable">
  <tr><th>Installer</th>
    <th>Installed BP</th>
    <th>Activity</th>
    <th>End Date</th>
    <th>Time Left</th>
  <th>Status</th></tr>
  [{section name=job loop=$jobs}]
  <tr>
    <td>[{$jobs[job].installer}]</td>
    <td>[{$jobs[job].typeName}]</td>
    <td>[{$jobs[job].activity}]</td>
    <td class="justcol">[{$jobs[job].endDateStr}]</td>
    [{if $jobs[job].timeTilEnd > 0}]
    <td>[{$jobs[job].timeLeft}]</td>
    [{else}]
    <td align="center">-</td>
    [{/if}]
    [{if $jobs[job].timeTilEnd <= 0}]
    [{if $jobs[job].completedStatus == 0 && $jobs[job].activity != 'Invention'}]
    <td class="delivered">Delivered</td>
    [{elseif $jobs[job].completedStatus == 1 && $jobs[job].activity == 'Invention'}]
    <td class="success">Success</td>
    [{elseif $jobs[job].completedStatus == 1}]
    <td class="delivered">Delivered</td>
    [{elseif $jobs[job].completedStatus == 2}]
    <td class="aborted">Aborted</td>
    [{elseif $jobs[job].completedStatus == 3}]
    <td class="aborted">GM Aborted</td>
    [{elseif $jobs[job].completedStatus == 4}]
    <td class="pending">Inflight unanchored</td>
    [{elseif $jobs[job].completedStatus == 5}]
    <td class="aborted">Destroyed</td>
    [{else}]
    <td class="red">Failed</td>
    [{/if}]
    [{else}]
    [{if $jobs[job].installTime < $jobs[job].beginProductionTime && $jobs[job].beginProductionTime > $smarty.now}]
    <td class="pending">Pending</td>
    [{else}]
    <td class="progress">In Progress</td>
    [{/if}]
    [{/if}]
  </tr>
  [{/section}]
</table>
<script language="javascript" type="text/javascript">
  var jobTableFilters = {
    col_0: "select",
    col_2: "select",
    col_3: "none",
    col_4: "none",
    col_5: "select",
    sort_select: true,
    btn: false,
    loader: true,
    loader_text: "Filtering data...",
    loader_html: '<img src="./images/loader.gif" alt="" ' +
      'style="vertical-align:middle;" /><h3>Loading...</h3>',
    display_all_text: "< Show all >"
  }
  setFilterGrid("jobTable",jobTableFilters);
</script>
[{/if}]